package com.pactera.madp.cp.controller.sidebar.contact;

import com.pactera.madp.common.core.util.R;

import com.pactera.madp.common.log.annotation.SysLog;
import com.pactera.madp.cp.api.dto.contactfieldpivot.ContactFieldPivotDto;
import com.pactera.madp.cp.service.IWorkContactFieldPivotService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ContactFieldPivotWeChatController
 *
 * @author jun
 * @version 1.0
 * 2021/6/29 10:00
 **/
@RestController
@AllArgsConstructor
@RequestMapping("/contactfieldpivotwechat")
@Api(value = "contactfieldpivotwechat", tags = "客户详情 - 用户画像-微信")
public class ContactFieldPivotWeChatController {

    private IWorkContactFieldPivotService contactFieldPivotService;

    @SysLog("客户详情 - 编辑用户画像-微信")
    @PutMapping("/update")
    @ApiOperation(value = "客户详情 - 编辑用户画像-微信")
    public R<Boolean> updateContactFieldPivotWx(@RequestBody ContactFieldPivotDto param) {
        return contactFieldPivotService.updateContactFieldPivotWeChat(param) ? R.ok(Boolean.TRUE,"修改成功") : R.failed(Boolean.FALSE,"修改失败");
    }

}
